package simulatore;

public class IntervalloDiConfidenza {
	
	private double lowerInterval;
	private double upperInterval;
	private double center;
	
	public IntervalloDiConfidenza(double lowerInterval,double upperInterval,double center) {
		
		this.lowerInterval = lowerInterval;
		this.upperInterval = upperInterval;
		this.center = center;
		
	}
	
	public void setLowerInterval(double lowerInterval) {
		this.lowerInterval = lowerInterval;
	}
	
	public void setUpperInterval(double upperInteval) {
		this.upperInterval = upperInteval;
	}
	
	public void setCenter(double center) {
		this.center = center;
	}
	
	public double getLowerInterval() {
		return lowerInterval;
	}
	
	public double getUpperInterval() {
		return upperInterval;
	}
	
	public double getCenter() {
		return center;
	}
	
	public String toString() {
		return lowerInterval + " - " + upperInterval;
	}
	
	public boolean appartiene(double value) {
		if((value >= lowerInterval) && (value <= upperInterval))
			return true;
		else
			return false;
	}

}
